﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BusinessObjects.BusinessRules;

namespace BusinessObjects.Person
{
    public class CountryRegion : BusinessObject
    {
        public CountryRegion()
        {
            AddRule(new ValidateRequired("CountryRegionCode"));
            AddRule(new ValidateLength("CountryRegionCode", 0, 20));

            AddRule(new ValidateRequired("CountryRegionName"));
            AddRule(new ValidateLength("CountryRegionName", 0, 255));
        }

        public CountryRegion(string countryRegionCode, string countryRegionName, DateTime createDate, DateTime modifiedDate, 
                                string description, bool isActive)
            : this()
        {
            CountryRegionCode = countryRegionCode;
            CountryRegionName = countryRegionName;
            CreateDate = createDate;
            ModifiedDate = modifiedDate;
            Description = description;
            IsActive = isActive;
        }

        public string CountryRegionCode { get; set; }

        public string CountryRegionName { get; set; }

        public DateTime CreateDate { get; set; }

        public DateTime ModifiedDate { get; set; }

        public string Description { get; set; }

        public bool IsActive { get; set; }
    }
}
